import axios from "axios";

function request(url: string, method: string, body?: any) {
  return axios({
    url: "http://localhost:3000" + url,
    headers: {
      "Content-Type": "application/json"
    },
    method,
    data: body
  });
}

export default request;
